export const barrierMap = {
  degree: {
    0: "简单",
    1: "普通",
    2: "困难",
    3: "王者",
    4: "地狱"
  }
};

export type DegreeType = keyof typeof barrierMap.degree;

export interface PositionXY {
  x: number;
  y: number;
}
export interface MonsterItem {
  monsterId: number;
  level: number;
}
export interface Barriers {
  id: number;
  name: string;
  position?: PositionXY;
  monsters?: MonsterItem[];
  averageLevel: number;
}
export const barriers: Barriers[] = [
  {
    id: 0,
    name: "雾隐森林入口",
    averageLevel: 1,
    position: {
      x: 243,
      y: 456
    },
    monsters: [
      {
        monsterId: 0,
        level: 1
      }
    ]
  },
  {
    id: 1,
    name: "雾隐森林外围",
    averageLevel: 3,
    position: {
      x: 277,
      y: 362
    },
    monsters: [
      {
        monsterId: 0,
        level: 1
      },
      {
        monsterId: 0,
        level: 2
      }
    ]
  },
  {
    id: 2,
    name: "雾隐森林深处",
    averageLevel: 4,
    position: {
      x: 300,
      y: 277
    },
    monsters: [
      {
        monsterId: 0,
        level: 2
      },
      {
        monsterId: 0,
        level: 5
      }
    ]
  },
  {
    id: 3,
    name: "雾隐森林内部",
    averageLevel: 6,
    position: {
      x: 373,
      y: 222
    },
    monsters: [
      {
        monsterId: 0,
        level: 5
      },
      {
        monsterId: 0,
        level: 5
      }
    ]
  },
  {
    id: 4,
    name: "扭曲丛林边缘",
    averageLevel: 13,
    position: {
      x: 491,
      y: 203
    },
    monsters: [
      {
        monsterId: 0,
        level: 5
      },
      {
        monsterId: 1,
        level: 10
      },
      {
        monsterId: 3,
        level: 7
      }
    ]
  },
  {
    id: 5,
    name: "天庭遗址",
    averageLevel: 16,
    position: {
      x: 436,
      y: 285
    },
    monsters: [
      {
        monsterId: 0,
        level: 5
      },
      {
        monsterId: 0,
        level: 7
      },
      {
        monsterId: 1,
        level: 7
      },
      {
        monsterId: 2,
        level: 12
      }
    ]
  },
  {
    id: 6,
    name: "群蛇峡谷边缘",
    averageLevel: 15,
    position: {
      x: 418,
      y: 347
    },
    monsters: [
      {
        monsterId: 3,
        level: 15
      },
      {
        monsterId: 3,
        level: 15
      },
      {
        monsterId: 3,
        level: 15
      },
      {
        monsterId: 1,
        level: 15
      },
      {
        monsterId: 1,
        level: 15
      }
    ]
  },
  {
    id: 7,
    name: "扭曲丛林深处",
    averageLevel: 20,
    position: {
      x: 600,
      y: 150
    },
    monsters: [
      {
        monsterId: 4,
        level: 15
      },
      {
        monsterId: 4,
        level: 15
      },
      {
        monsterId: 4,
        level: 15
      },
      {
        monsterId: 5,
        level: 20
      },
      {
        monsterId: 5,
        level: 20
      }
    ]
  },
  {
    id: 8,
    name: "迷雾沼泽边缘",
    averageLevel: 27,
    position: {
      x: 340,
      y: 419
    },
    monsters: [
      {
        monsterId: 4,
        level: 20
      },
      {
        monsterId: 4,
        level: 20
      },
      {
        monsterId: 5,
        level: 20
      },
      {
        monsterId: 6,
        level: 20
      }
    ]
  },
  {
    id: 9,
    name: "迷雾沼泽中心",
    averageLevel: 29,
    position: {
      x: 354,
      y: 487
    },
    monsters: [
      {
        monsterId: 4,
        level: 20
      },
      {
        monsterId: 5,
        level: 20
      },
      {
        monsterId: 6,
        level: 20
      },
      {
        monsterId: 7,
        level: 20
      }
    ]
  }
];

export const barriersMap = new Map();
barriers.forEach(m => {
  barriersMap.set(m.id, m);
});

/**
 * barrierType
 * @param
 * 0 副本
 * 1 塔
 */
